package com.lagou.edu.bean;

import com.lagou.edu.dao.AccountDao;

/**
 * @author wsz
 * @date 2021/10/20 9:40
 **/
public class DoTest {

    public static void main(String[] args) {
        // 1. 准备beanFactory
        DefaultListableBeanFactory factory = new DefaultListableBeanFactory("com.lagou.edu");
        // 2. 初始化缓存
        factory.refreshBeanFactory();
        // 3. 注册BeanDefinition
        factory.registryBeanDefinition();
        // 4. 注册bean
        factory.registryBean();

        AccountDao accountDao = (AccountDao) factory.getBean("jdbcAccountDao");
        System.out.println(accountDao);
    }
}
